PACKAGES_PATH                  = '/usr/share/icones-magicos/packages'
PACKAGES_MD5SUM_LIST           = '/var/lib/icones-magicos/md5sums'
PACKAGES_INSTALLED_DIR         = 'installed'
PACKAGE_CONFIG_FILE            = 'package.conf'
PACKAGE_CONFIG_DEFAULT_HEADER  = 'General'
PACKAGE_DESCRIPTION_FILE       = 'package.article'
PACKAGE_IMPORTANT_FILES        = ['package.conf', 'screenshot.png']
PACKAGE_CONFIG_REQUIRED_FIELDS = ['Name', 'Author', 'Category', 'Description', 'ReferenceFile', 'Link']
PACKAGES_CATEGORIES            = ['development', 'games', 'graphics', 'hardware', 'internet', 'multimedia', 'virtualization']


#Carrega a lista de md5 dos pacotes oficiais
import sys
try:
    lines = open(PACKAGES_MD5SUM_LIST, 'r')
    PACKAGES_MD5 = dict([(ln[1].lower(), ln[0].lower()) for ln in [ln.split() for ln in lines]])
except IOError:
    PACKAGES_MD5 = {}
    print >> sys.stderr, 'Falha ao abrir a lista de md5 dos pacotes oficiais.'
